Skip to content

Conversation

@bhavya2109sharma
Copy link
Contributor

@bhavya2109sharma bhavya2109sharma commented Oct 30, 2025

Problem

Users had no idea what was happening during connecting to remote space, which can take few seconds to connect.
User clicks "Connect" → Nothing visible happens for few seconds → Either success or failure

Solution

Adds progress tracking for SageMaker space connections which shows connection status with space name in progress dialog
Test cases are not being added because it is just showing the user about progress during Space operations for good user experience.

Testing

Tested for both SM-AI and SMUS Spaces.

  1. Screen.Recording.2025-10-30.at.2.38.04.PM.mov
  2. Screen.Recording.2025-10-30.at.2.37.20.PM.mov

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bhavya2109sharma bhavya2109sharma requested a review from a team as a code owner October 30, 2025 23:01
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@bhavya2109sharma bhavya2109sharma changed the title Add:progress indicator during SageMaker space remote connection process feat(sagemaker): add progress indicator during space remote connection process Oct 30, 2025
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

title: `Connecting to ${spaceName}`,
},
async (progress) => {
progress.report({ message: 'Starting the space. This can take around 2 minutes.' })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we get the number? if it's a larger type would it be much longer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it from UXD

@vpbhargav
Copy link
Contributor

Thanks for making this fix, appreciate it!

title: `Connecting to ${spaceName}`,
},
async (progress) => {
progress.report({ message: 'Starting the space. This can take around 2 minutes.' })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This can take around 2 minutes" is a hard thing to justify or communicate due to the variability (10s to >5mins depending on image). For now, would just do

"Starting space {spaceName}..."

Good intent but when this done in the web UI also users were left confused and we had a lot of feedback. So until we figure out a better message, lets avoid it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I will remove it for now

Copy link
Contributor Author

@bhavya2109sharma bhavya2109sharma Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So msg will appear with the change like this : Connecting to ${spaceName} : Starting the space
is this fine ?

@laileni-aws laileni-aws enabled auto-merge (squash) October 31, 2025 20:26
@laileni-aws
Copy link
Contributor

/retryBuilds

// Ignore InstanceTypeError since it means the user decided not to use an instanceType with more memory
if (err.code !== InstanceTypeError) {

const spaceName = node.spaceApp.SpaceName!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems to be a nullable, are we sure all the functions below which use this field handle the null case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will happen if this is null/undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaceName cannot be null because spaces must have names when created

@laileni-aws laileni-aws disabled auto-merge November 1, 2025 00:01
// In case of SMUS, we pass in a SM Client and for SM AI, it creates a new SM Client.
const client = sageMakerClient ? sageMakerClient : new SagemakerClient(node.regionCode)

try {
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry what's the purpose of having 2 layers of try...catch?
cant' we use 1?

try {
} catch() {
    if (error.code === InstanceTypeError) {
    }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it.

Copy link
Contributor

@dylanraws dylanraws Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears previously we were logging all uncaught errors. Do we no longer want to do that? I just want to make sure removing that was intentional.

getLogger().error(`sm:openRemoteConnect: ${err}`)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not there before more change. First I thought of having uncaught errors throws as well.
Now with this change only Progress Indicator is in place

@laileni-aws
Copy link
Contributor

/retryBuilds

@laileni-aws laileni-aws enabled auto-merge (squash) November 3, 2025 18:04
@laileni-aws laileni-aws merged commit 2e1a219 into aws:master Nov 3, 2025
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants